export function startUpdate() {
    try {
        let datestr = new Date().toLocaleDateString()
        let timestr = new Date().toLocaleTimeString()
        let datenodes = document.querySelectorAll('.time-part.date')
        datenodes.forEach(e => {
            e.innerHTML = datestr;
        })
        let timenodes = document.querySelectorAll('.time-part.time')
        timenodes.forEach(e => {
            e.innerHTML = timestr
        })
    }
    catch { 
        console.log('e')
    }
    setInterval(() => {
        let datestr = new Date().toLocaleDateString()
        let timestr = new Date().toLocaleTimeString()
        let datenodes = document.querySelectorAll('.time-part.date')
        datenodes.forEach(e => {
            e.innerHTML = datestr;
        })
        let timenodes = document.querySelectorAll('.time-part.time')
        timenodes.forEach(e => {
            e.innerHTML = timestr
        })
    }, 1000)
}